Graphical editor with incremental development

ABSTRACT

Techniques for developing a graphical editor using an incremental development approach. Externally-stored descriptors are used to specify information on which a graphical editor engine operates to create a graphical editor. Developers can thus redefine the look and feel of the graphical editor by modifying these descriptors, effectively re-configuring the elements of visual models without changing the code of the graphical editor engine. Visual models for modeling a domain can be created and used, without first requiring the domain model to be defined.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to computer programming, and deals moreparticularly with techniques for developing a graphical editor using anincremental development approach.

2. Description of the Related Art

Conducting business electronically using distributed networkingenvironments such as the Internet—commonly referred to as“e-business”—is increasingly popular with business enterprisesthroughout the world. Providing e-business software—that is, softwarewith which an enterprise provides its “electronic presence” in thee-business marketplace and conducts business electronically—can be acomplex, time-consuming, and costly undertaking. Vendors such as theInternational Business Machines Corporation (“IBM”®) provide theircustomers with platforms and tools to assist in this process. Suchplatforms and tools must fulfill user's needs while being developed in abrisk-paced approach in order to remain competitive. (“IBM” is aregistered trademark of the International Business Machines Corporationin the United States, other countries, or both.)

Today, tools for developing e-business software (as well other types ofsoftware) are commonly composed from many functional components. One ofthe main components of many tools is a graphical editor. Graphicaleditors present views of underlying domain models using graphicalrepresentations that include elements such as circles, boxes, lines,images, and icons. Graphical editors can be used for modeling thingssuch as business processes, application models, or even user interface(“UI”) screens. Since graphical editors mainly interact with users, akey success factor of graphical editor design is to have an appropriateusability that simplifies the user interactions and meets the userneeds.

Creating a graphical editor is not an easy task, and requiresconsiderable interaction with usability analysts. Usability analysts arepeople who are concerned with defining the requirements foreffectiveness, efficiency, and satisfaction with which the end users canachieve tasks when using an application. When defining theserequirements, usability analysts often consult people such as mediadesigners, domain modelers, and high-privilege user groups.

There are many different approaches in designing a graphical editor. Oneapproach focuses on how to describe the requirements. When designingaccording to this approach, a story board is often used to describesnapshots of visual views and the relationship of the visual elements.However, this approach can only describe a high-level relationshipbetween visual views, and seems insufficient when trying to describe thedetails of each visual element.

Another, more expensive, approach is to develop a prototype. A prototypewill provide a product-like, high-level perspective of the editor'susability behavior, and can be used to depict some of the high-levelrequirements of the graphical editor. The prototype is normallydeveloped in a fast-paced manner in order to reduce the developmentcycle, cut costs, and/or avoid addressing some of the technical detailsthat cannot be resolved at that moment. A major drawback of prototypes,however, is that they only try to present the general idea of theeditor, and the developed prototype code typically cannot be reused indevelopment of the editor itself. In addition, the usabilityrequirements captured in the prototype stage may not accurately reflectthe needs of the developed product.

In another approach, which speeds up the development cycle, a frameworkis provided. The framework approach can be used in development ofprototypes or in actual product development cycles, and can reduce afair amount of coding time. However, this approach still requiresconsiderable effort to create an actual implementation. Since thisapproach is somewhat inflexible, it requires cautious planning andproactive process control since normally, requirements can only beaccommodated in the early stage of the development cycle. Unfortunately,this does not match the nature of usability analysis, which tends to bean iterative process.

Today, developing a graphical editor of a tool normally follows theframework approach and uses the so-called “model-view-controller”, or“MVC”, pattern. The MVC pattern consists of three kinds of objects. TheVisual (“V”) object is the view representation in the graphical editor.The Model (“M”) object is the domain model that the visual objectrepresents. Finally, the Controller (“C”) object defines how the userinterface reacts to the user input. The MVC pattern has been applied tomany different graphical editor frameworks.

As an example, the Eclipse Graphical Editing Framework (“GEF”) issometimes used as a graphical editor development framework. (Eclipseprovides an open-source framework that is commonly used for developmentof e-business applications.) GEF provides a set of applicationprogramming interfaces (“APIs”) for software developers to use andextend when developing their code. As discussed above, using thisframework approach provides some benefits to reduce the developmentcycle; however the cycle is still not short enough. It also does notprovide the flexibility to modify the editor when needed.

The above approaches are not fully effective for developing graphicaleditors because usability analysts do not have the capability to touchand feel the product in sufficient, representative detail in the earlymilestone or phase of a software development cycle. Using the currentapproaches, the most effective way to provide a graphical editor is todevelop a full product and then allow the usability analysts to studythe problems and fix those problems in the next development cycle.However, this after-the-fact approach may cause the failure of theproduct in the marketplace.

SUMMARY OF THE INVENTION

The present invention enables an incremental development approach,whereby a prototype-like graphical editor can be developed in the earlystage of a product development cycle. By overlapping the prototypingcycle with the development cycle, the invention provides a solution thatallows developers to quickly create a graphical editor. At this earlystage, the graphical editor can be considered a product deliverablewhich supports a primary view of the (eventual) editor. Thus, thegraphical editor can be released to the usability analysts for theirreview and comments while the tool for which the editor is beingprovided is still in the development cycle.

At later stages in the product development cycle, the invention enablesincrementally adding new functions and behaviors to the graphical editorwhen new requirements are identified. The cost and duration of thedevelopment cycle can be reduced through use of the present invention,which may also greatly reduce mistakes when communicating users'requirements to the development team. As an added benefit, related userscan participate in the design of tools in the early stage ofdevelopment.

In terms of the invention, the visual model is the context model thatthe user interacts with, while the domain model captures the domaininformation. An instance of visual model elements displayed in thegraphical editor represents a domain model element or object, or a groupof domain model elements of the same type. Taking a graphical editor foran organization as an example, a person-shaped icon might be used torepresent an employee in a view provided through the editor, or perhapsseveral of the person-shaped icons might be presented to representseveral of the employees. The actual association between visual modelelement(s) and the corresponding domain model element(s) can be realizedin a later stage in the development cycle, thereby enabling work on theorganization-oriented graphical editor to begin in parallel with work onthe domain model definition.

Preferred embodiments store the visual model in a structural file thatis separated from a structural file containing the persistent data ofthe domain model elements. Preferably, XML is used for specifying thesestructural files, although other markup languages may be used withoutdeviating from the scope of the invention. (Examples of structural filesare discussed below with reference to FIGS. 5 and 7, which depict asample domain model structural file and a sample visual model structuralfile, respectively.) The abstraction of the visual models facilitatesthe rapid development of the graphical editor, for the visual behaviorsare a major concern of the usability analysts and the toolingdevelopers, especially when the domain models are still going throughrefinement iterations.

The separation of the visual relationships from the domain objectrelationships helps the tooling developers focus on the toolingrequirements. For example, a department has an aggregating relationshipwith its employees. In an organization modeling tool, a department maybe presented visually as an owned element of a manager, who is one ofthe department employees. The visual relationship between the managerand the department illustrated in the editor does not necessarily matchthe relationship defined in the domain models, but satisfies the toolingrequirements.

Overall, the invention can create visual models for modeling a domain,without first requiring the domain model to be defined.Externally-stored descriptors are used to specify information on which agraphical editor engine operates to create a graphical editor. Theinvention allows developers to redefine the look and feel of thegraphical editor by modifying these descriptors, thus re-configuring theelements of visual models without changing the code of the graphicaleditor engine. This minimizes the development cycle and provides arapid, incremental, intuitive approach for graphical editor development.

In one aspect, the present invention provides a method of enablingincremental development of a graphical editor, comprising steps of:providing an editor engine component that creates the graphical editor;adapting the editor engine component to process a visual modelstructural file, wherein the visual model structural file describes avisual model supported by the editor engine, adheres to a specifiedvisual meta-model, identifies a visual model descriptor file, andsupports graphical editing of one or more domains; and adapting theeditor engine component to process the identified visual modeldescriptor file, wherein the identified visual model descriptor filespecifies constraints on the visual model and adheres to a specifiedvisual descriptor meta-model, and wherein the processing of the visualmodel descriptor file thereby configures behavior of the visual model inthe graphical editor.

In another aspect, the present invention provides a system for enablingincremental development of a graphical editor, comprising: an editorengine component that creates the graphical editor; processing means inthe editor engine component for processing a visual model structuralfile, wherein the visual model structural file describes a visual modelsupported by the editor engine, adheres to a specified visualmeta-model, identifies a visual model descriptor file, and supportsgraphical editing of one or more domains; and processing means in theeditor engine component for processing the identified visual modeldescriptor file, wherein the identified visual model descriptor filespecifies constraints on the visual model and adheres to a specifiedvisual descriptor meta-model, and wherein the processing of the visualmodel descriptor file thereby configures behavior of the visual model inthe graphical editor.

In yet another aspect, the present invention provides a computer programproduct for enabling incremental development of a graphical editor,wherein the computer program product is embodied on one or morecomputer-readable media and comprises computer-readable instructionsfor: executing an editor engine component that creates the graphicaleditor; processing, by the editor engine component, a visual modelstructural file, wherein the visual model structural file describes avisual model supported by the editor engine, adheres to a specifiedvisual meta-model, identifies a visual model descriptor file, andsupports graphical editing of one or more domains; and processing, bythe editor engine component, the identified visual model descriptorfile, wherein the identified visual model descriptor file specifiesconstraints on the visual model and adheres to a specified visualdescriptor meta-model, and wherein the processing of the visual modeldescriptor file thereby configures behavior of the visual model in thegraphical editor.

The present invention will now be described with reference to thefollowing drawings, in which like reference numbers denote the sameelement throughout.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a high-level representation of components involved inpreferred embodiments of the invention;

FIG. 2 provides a flowchart illustrating how the present invention maybe used for creating graphical editors;

FIG. 3 presents a visual representation of a sample domain model(representing houses) that is used in describing preferred embodiments;

FIG. 4 provides a sample meta-model (using Unified Modeling Language, or“UML”, notation) for domain objects in the domain illustrated by FIG. 3,and FIG. 5 provides a sample domain object specification according tothis meta-model, where this specification is encoded in the ExtensibleMarkup Language (“XML”);

FIG. 6 describes, using UML notation, components of the Common VisualMeta-model used in preferred embodiments;

FIG. 7 provides an example of a Common Visual Model for the domain modelspecified in FIG. 5 and illustrated in FIG. 3;

FIG. 8 provides an example of a Visual Model Descriptor for the domainmodel specified in FIG. 5 and illustrated in FIG. 3;

FIG. 9 depicts, in UML notation, the Visual Model Descriptor Meta-modelexemplified by FIG. 8;

FIG. 10 shows a sequence diagram of creating visual model elements,according to preferred embodiments; and

FIG. 11 (comprising FIGS. 11A and 11B) depicts a flowchart that shows asample scenario of using a preferred embodiment of the invention.

DESCRIPTION OF PREFERRED EMBODIMENTS

The present invention provides incremental graphical editor developmentcapability, using combined modularity patterns by introducing a visualcomposition model and a set of visual modules. FIG. 1 shows a high-levelrepresentation of components involved in preferred embodiments of theinvention. As illustrated therein, the visual composition modelcomprises what is referred to herein as a “Common Graphical EditorSystem” 100. This system interfaces with supporting models 155, whilethe set of visual modules is preferably realized using pre-builtplug-and-play parts 170.

In preferred embodiments, the invention categorizes visual compositionmodels into two basic kinds, a node semantic model and a link semanticmodel, and creates a common interface (referred to herein as a “CommonVisual Model”, illustrated at 145 in FIG. 1) which defines the commonbehavior of all the visual composition models. “Semantic models”, asthat term is used herein, describe the meanings of a particular model,but not the visual representation of the model. Objects that mustcoexist with exactly two other objects are abstracted as link semanticmodel elements. Other objects are captured as node semantic modelelements. For example, a person can be imagined as having the nodesemantic because the person can stand alone during modeling, whereas theparental relationship between two persons can be imagined as having thelink semantic. However, the visual representations of persons and ofrelationships between persons can be very different. Persons (or “personnodes”) might each be visually represented as independent boxes on theUI, for example, while the parental relationship might be visuallyrepresented by a line with an arrowhead pointing from the parent towardthe child, or perhaps as nested boxes where, for example, a box for thechild sits inside a box for the parent on the UI.

The visual depiction of a link may have a number of different forms,depending on factors such as the underlying model and the decisions ofthe usability analysts. As examples, a link may be shown by a line orarc, or as in the parental example discussed above, by the graphicalposition or composition between node depictions.

To fully capture the visual composition behaviors, the invention alsocategorizes the relationships among nodes. In preferred embodiments,three types of categorization are used: composition ownership, contentownership, and reference. For example, when modeling a house in agraphical editor, the house may have composition elements such aswindows, doors, walls, roofs, etc.; may have content elements such asthe people living in the house, furniture, paintings on the walls, etc.;and may have reference relationships with neighboring houses. Nodes thatcan have composition elements are furthered categorized as compositionnodes.

Nodes and links can have many different graphical representations andcomposition behaviors. They can also represent different domain modelelements. Referring again to the graphical editor for an organization, anode can represent an employee of the company. The graphicalrepresentation of an employee can be a figure of a circle or box, or ahuman being image or icon. A link between two employees can representthe management relationship. The graphical representation of the linkcan be a solid link with an arrow pointing to the employee who is beingmanaged or pointing to the manager to whom an employee reports. Usingthe same example, a container node could be used to represent adepartment. The composition elements of the container, which are theemployee nodes connected to the department node, represent the employeeswho work for the department. In terms of graphical editing, when adepartment is moved (relocated), the employees and the managementrelationships are also moved at the same time. This indicates that thevisual composition behavior of the common visual model reflects theactual composition behavior of an organization.

In preferred embodiments, the invention uses optional references todetach visual models from domain models. (See, for example, 146 in FIG.1, where this is illustrated.) This approach offers several benefitswhich are not available with the conventional approach to loose couplingof presentation data and domain data, including:

(1) a visual model can be created in the early stage of a productdevelopment cycle, without awaiting knowledge of the domain model forthat product. In fact, a visual model can be created without a domainmodel. The association of the domain model with the visual model canthen be deferred, and performed at a later stage (for example, after thedomain model design is finalized). This enables the parallel developmentof the graphical editor and the domain model(s); and

(2) the reuse of a visual model for different types of domain models,the independence of the visual tooling, and the conceptual assistance todomain model design (e.g., whereby usability analysis results obtainedwith a visual model can be fed back as refinements for the domain modeldesign).

Preferred embodiments of the invention isolate the visualization datafrom domain data so that a small set of visual models can represent avirtually unlimited number of different kinds of domain objects. Thevisual model can be externalized (or persisted) in a separate structuralfile. This allows a particular domain model to have different visualmodels for targeting different usages, if desired. That is, in additionto using one visual model for multiple domain models, a particulardomain model may be associated with more than one visual model.

In preferred embodiments, the invention uses the descriptor mechanism(i.e., a set of externalized specifications that are read and processed)that allows developers to define and configure the properties of thevisual elements in the graphical editor. For example, one can define thebasic shapes of a visual element, the composition behaviors, and therelationships with other visual elements. One or more of theseproperties can be changed, if necessary, by modifying the appropriatedescriptor information. Developers are also able to define the types ofthe domain model elements that will be associated with the visualelements. With reference to the person and parent example discussedearlier, a developer might therefore create a descriptor specifying thatperson nodes are to be represented using graphical boxes; that personscan be related by a parental relationship; and that person nodes can betherefore be graphically composed in certain ways to indicate thisrelationship (such as by nesting the related box shapes). See also FIG.8, discussed below, where a sample descriptor for a visual model isprovided.

In order to enable a fast-paced development cycle as well as enableincrementally adding new behaviors for the modeled elements, preferredembodiments of the invention support use of plug-and-play parts (asnoted earlier with reference to 170 in FIG. 1). Parts are preferablydeployed as modules that can be used when creating editors. For example,a box shape may be provided as a pre-built part, where this box shapecan be used as a graphical representation of a person node. Or as onealternative, a person node might be represented using a pre-built partthat depicts an iconic representation of a person's head. Preferredembodiments also provide a framework for developers to create (orextend) parts when none of the pre-built parts are appropriate, andwhereby one or more classes are provided for working with the pre-builtparts. As a result, developers are able to create a prototype-likegraphical editor immediately, leveraging these pre-built parts, withoutthe need to build parts from scratch. The developers can then spend timeto provide more details for each individual part as needed.

Together, the deferred association of a visual model instance with adomain object and the configuration of visual model behaviors throughexternalized descriptor data, as discussed above, provide the capabilityof developing graphical editing tools incrementally and intuitivelywithout awaiting full prototyping cycles.

By using the invention, developers are able to create a graphical editorquickly. The editor can then be passed to the usability analysts tostudy whether the existing product requirements are addressed properly,and/or whether there are additional requirements that have not beenidentified. The recommendations from the usability analysts can then befed back to the development team to incorporate into the next iteration.This development process is illustrated in FIG. 2, as will now bediscussed.

Initially, a document of the visual model, including behaviors of thevisual model elements, is produced (Block 200). Developers then create agraphical editor descriptor based on this document (Block 210). (Referalso to the description of FIG. 8, below, where a sample descriptor fora visual model is presented.) In preferred embodiments, this descriptoris registered with the editor engine (Block 220). See also FIG. 1, wheredescriptor 105 is registered 106 to registry 110.

At Block 230, the editor engine then creates a graphical editor whichmay be used, for example, for testing or other analysis. Block 240represents a decision as to whether the usability analysts havejustified the behavior as presented. If so, then the process shown inFIG. 2 ends (Block 250). Otherwise, the document of the visual model isupdated (Block 260), which may include revisions suggested by theusability analysts, and control returns to Block 200 where this reviseddocument is used as input for another iteration.

As was noted earlier with reference to FIG. 1, the mechanism of theinvention is conceptually divided into two pieces: a set of pre-builtparts and a common graphical editor system. Each of these will now bedescribed in more detail.

The set of pre-built parts was briefly discussed above with reference to170 of FIG. 1. In preferred embodiments, these pre-built parts include aset of common edit parts 171, a set of common figures 172, and a set ofsample or reference icons 173. Providing these pre-built parts enablescreating a prototype-like graphical editor very quickly, wherebygraphical representations can be created from the provided parts withoutspending too much time on developing parts from the ground up.

The common edit parts 171 are preferably used to describe behaviors ofvisual elements. An edit part for a line, as one example, is preferablyprovided that allows a user to drag the end of the line and thus extendthe line. Similarly, an edit part for a box is preferably provided thatenables the user to resize the box by dragging a line (i.e., side) ofthe box. Common edit parts may also be provided for operating onrepresentations of nodes, links, containers, content, labels, and soforth. The common figures 172 preferably provide graphicalrepresentations such as boxes (i.e., rectangles and/or squares),circles, ovals, lines, arrows, etc., which can be used to visuallyrepresent a semantic model. The reference icons 173 may also be used tovisually represent a semantic model, as well as to further categorizethe type of figure depicted. (As discussed briefly above, a “person”icon might be provided so that users can depict people using arepresentation that is more natural than a figure such as a box orcircle.)

The components of the Common Graphical Editor System (shown generally at100 in FIG. 1) of preferred embodiments comprise a Descriptor Registry110, Visual Model Descriptor 125, Common Graphical Editor Factory 130,Common Graphical Editor 135, and Common Visual Model 145. A sampledomain model (representing houses) that will be used in describingpreferred embodiments will now be introduced, after which the componentsshown in FIG. 1 will be described in more detail.

FIG. 3 presents a visual representation 300 of a domain modelrepresenting houses. (This domain model is used herein, by way ofillustration only, in further describing preferred embodiments.) Asshown therein, a house object from the domain model is visuallyrepresented as a box 310. This sample house includes two windows 320,321 and one door 330. This sample house is furnished with a sofa 340, atable 350, and four chairs 360. This house 310 is also depicted asreferencing 371 a neighbor's house 370.

FIG. 4 provides a sample meta-model 400 for this domain objectrepresentation 300, and FIG. 5 provides an XML document 500 thatspecifies a sample domain object specification according to thismeta-model 400. As shown by these examples, a <house> element 510identifies this particular domain object as “bobHouse” 511 (i.e., “Bob'shouse”, in this example); a <doors> element 520 indicates that Bob'shouse has a door identified as “southEntryDoor” 521; a <windows> element530 specifies that Bob's house has two windows 531, 532; and a<furniture> element 540 lists furniture associated with Bob's house. Inparticular, the <furniture> element 540 further comprises child elementsthat identify the particular sofa, table, and chairs in this house.Attributes in domain model specification 500 specify details of thesevarious features of Bob's house (such as the material from which Bob'ssofa and table are made; see 541, 542). The <neighbor> element 550identifies a neighbor's house (in this example, having an attributevalue of “janeHouse”). According to domain model 400 of FIG. 4, element550 indicates that Bob's house is linked to this identified house. XMLdocument 500 thus contains a second <house> element 560 that specifiesfurther information about this linked house 550.

FIGS. 7 and 8, discussed below, also refer to the house domain model.

As noted earlier with reference to FIG. 1, preferred embodiments of theinvention use a Common Visual Model 145 which defines the model elementsfrom which graphical editors are composed. FIG. 6 depicts the CommonVisual Meta-model. (Refer also to FIG. 7, which is described below,where a sample document according to this meta-model is provided.) Asshown in FIG. 6 using a UML diagram, a Common Graphical Editor Modelcomponent (see 620) represents the model of all graphical editors. The“Inclusion” element 630 represents the common visual model 640 includedin the editor. Inside the Inclusion element, there may be “CommonNode”elements 650, “CommonLink” elements 660, “Composition” elements 670, and“CommonLabel” elements 680. A “domainObject” element 610, representing aparticular object from the domain model, can be graphically presentedwith different figures or images. (A person can be represented using abox or a person-like icon, for example, as discussed earlier.)Conversely, each visual model element can represent different domainmodel elements. (A box might represent a person, a house, or many othertypes of domain model elements, for example.)

FIG. 7 provides a sample document 700 that specifies a visual modelaccording to the meta-model in FIG. 6. A <composition> element 710includes an “id” attribute 712 and a “descriptor” attribute 713,specifying an identifier for a descriptor and the location (by referenceto the namespace element 711) of an external file where this descriptor(such as descriptor 800 of FIG. 8, in this example) is stored. As notedin the comments 720, there is no tight coupling between this visualmodel 700 and the separately-stored descriptor identified at 713. (Forexample, a different descriptor can be associated with visual model 700by replacing the value of attribute 713.)

A “domainObject” element 714 includes an “href” attribute 715. As notedin comments 722, the value of attribute 715 identifies the location ofan external file where a domain object specification (such asspecification 500 of FIG. 5, in this example) is stored. Comments 722further note that there is no tight coupling between this visual model700 and the separately-stored domain object identified at 715. (Forexample, a different domain object can be associated with visual model700 by replacing the value of attribute 715.)

The <compositionElements> element 730 includes <commonNode> elements732, 736, and 740. Each of these node elements specifies details fornodes that may be visually represented using a graphical editor createdaccording to document 700. Element 732, for example, specifiesinformation for a door, referring to an externally-stored descriptor(see 733) for this door and identifying (see 734) where the domainobject specification for this particular door (within the houseidentified at 715, in this example) is stored. Similarly, elements 736and 740 specify information pertaining to two windows.

As noted in comments 744, the <includedElements> element within element750 is a type of visual relationship, as are the <compositionElements>element 730 and the <commonLink> element 770. Comments 744 also notethat additional (or different) types of visual relationships might bespecified in a particular visual model.

The <content> element 750 further contains child elements pertaining tonodes (i.e., <commonNode> elements). In this example, the informationfor each node comprises a reference to a descriptor for that node (see,for example, 752) and a reference to a domain object for that node (see,for example 753), where the domain objects are elements of the furniturein the particular house identified at 715. Note that the specificationof doors, windows, and furniture in FIG. 7 corresponds to the visualrepresentation of the sample house shown in FIG. 3.

The <composition> element 760 is similar to element 710, and in thisexample, specifies similar information for the linked or referencedhouse (e.g., where to find a descriptor, 761, and where to find a domainobject, 762, for this referenced house). The <commonLink> element 770then specifies attributes of a visual reference that serves tographically link the two houses “house1” and “house2” according to the“neighborLink1” relationship.

In order to cope with an incremental development process, anothercomponent of preferred embodiments is the Visual Model Descriptors(represented at 105 in FIG. 1). XML documents are preferably used fordocumenting these Visual Model Descriptors. A visual model descriptorholds specific properties of visual model element 181 such as the domainmodel element type 182, the type of FIG. 184 to use for that domainmodel element, the icon 185, its edit part 186 (i.e., its behaviors),and its constraints 183. (All model elements may have constraints thatare applicable to them.) Referring now to FIG. 8, an example of a VisualModel Descriptor 800 for the house scenario is provided, as will now bediscussed.

Element 810 specifies a <composition Descriptor> for the house domainmodel. Attribute 811 identifies the domain model element type as being“houseDescriptor” (intuitively indicating that this is a visualdescriptor for a “house” domain object). Attribute 812 specifies thatthe edit part with which the graphical representation of this domainobject can be edited is named “houseEditPart” (i.e., the class name forthis edit part is “com.ibm.sample.houseEditPart”), and attribute 813specifies that the graphical figure to be used for visually depictingthis domain object is named “rectangleFigure” (i.e., the class name forthis figure is “com.ibm.btools.rectangleFigure”).

A child element of the <composition Descriptor> 810 is<compositionContraints> element 815, which specifies the compositiontype relationships available for the visual model of this object. Inthis example, element 815 specifies that the house object can havecomposition type relationships with visual models which are graphicallyrepresented as door images and window images. The individual<compositionConstraint> elements within element 815 further specify amaximum number of each of these elements using a “cardinality”attribute. According to this example, doors and windows can thus beassociated with a house, and the number of doors is limited (by thecardinality attribute) to 2, while the number of windows is limited to10.

Another child element of the <composition Descriptor> 810 is<inclusionConstraints> element 817. In this example, element 817specifies that the house object can have inclusion type relationshipswith visual elements which are graphically represented as bed images,chair images, desk images, sofa images, and table images.

The final child element of the <compositionDescriptor> element 810, inthis example, is the <inputConstraints> element 819. According to thisexample, the maximum number of houses that can be referenced, using linkrelationships, from a particular house is 4.

Next, <commonNodeDescriptor> elements 820, 830, 840, 850, 860, 870, 880specify each of the node descriptors that were previously referenced(using the “partId” attribute) at 815 and 817, and further specify theedit part to be used with each of these nodes and the figure that willrepresent each node when depicted on the UI. For example, element 820specifies that a door node is to be edited with a “doorEditPart” (i.e.,the class name for this edit part is “com.ibm.sample.doorEditPart”) andthat a “doorFigure” graphic will be used to visually depict a door(i.e., the class name for this figure is “com.ibm.sample.doorFigure”).

A <commonLinkDescriptor> element 890 then specifies which node elementscan be linked to a house node (at <permissionConstraints> 891), andwhich cannot (at <prohibitionConstraints> 892). Thus, in this example, ahouse node can be linked to nodes for other houses (see 891), but not tonodes for doors, windows, beds, chairs, desks, sofas, or tables (see892).

FIG. 9 depicts, in UML notation, the Visual Model Descriptor Meta-modelexemplified by FIG. 8. This figure indicates, for example, that thedescriptor element for a node, “CommonNodeDescriptor” 930, is related bya one-to-many relationship to “LinkCardinalityConstraint” elements 920that may be input 921 or output 922 constraints (i.e.,“inputConstraints” or “outputConstraints” elements). This is illustratedin the sample descriptor of FIG. 8 at 819, where input constraints arespecified for the house node identified at element 810. As anotherexample, FIG. 9 also indicates that the descriptor element for a link,“CommonLinkDescriptor” 940, may have child elements that are“permissionConstraints” 951 or “prohibitionConstraints” 952 elements.This is illustrated in the sample descriptor of FIG. 8 at linkdescription 890 and its child permission constraints element 891 andprohibition constraints element 892.

According to preferred embodiments, a visual model descriptor (such asthat shown at 800 in FIG. 8) is registered by a descriptor registry (asmentioned earlier with reference to 105, 106, 110 of FIG. 1) and readinto the common graphical editor 135 at the time the editor 135 starts.The loose coupling between the visual model element properties and thevisual model elements facilitates the reuse of the visual representationinformation, like icons and figure classes, and the editing propertieslike control classes and constraints. The descriptor registry 110provides the flexibility of configuring the editing behaviors of aneditor 135 by externally updating the visual model descriptor file 105and the editor layout (such as background color, palette content, etc.)of an editor by externally updating the graphical editor descriptor file115, without affecting the program code itself.

A visual model descriptor such as descriptor 800 can (optionally)specify the type of the domain models that is represented by the commonvisual model. (Because of the loose coupling that is possible betweendomain and visual models, usually it is not necessary for visual modeldescriptors to identify a particular type of domain model.) One type ofvisual model can be used to represent different types of domain objects.For example, a common node model can be used to represent an employeewith the person's photo, or used to represent a company with thecompany's logo. In terms of graphical editing, both the employeeinstances and the company instance interface the same way with theeditor (e.g., by enabling a user to drag and drop the employee photos aswell as the company logo). By configuring the descriptors, the twoinstances can have different editing behaviors. For example, adescriptor may specify that one-to-many links can be established fromthe instance representing the company to the instances representingemployees, while the employee instances might be limited to one-to-onereferences to the company instance. Thus, the editor may prevent a userfrom associating a particular employee photo with more than one companylogo while allowing the company logo to be linked to multiple employeephotos.

Referring now to FIG. 10, a sequence diagram illustrates how visualmodel elements may be created according to preferred embodiments.(Reference numbers are provided, when describing FIG. 10, to thecorresponding components in FIG. 1. Note that the term “Visual ModelDescriptor” is used herein to refer to the collection of all descriptorsused for visual models. “CommonDescriptor”, shown in the heading of FIG.10, is one type of these descriptors. “DescriptorFactory” and“VisualModelFactory” in the heading of FIG. 10 refer to utilities forobject instance creation. In preferred embodiments, these utilitiesperform a number of routine object creation tasks, such as insertingcreation timestamps, validating that there are no duplicate identifiers,and so forth.)

A Common Graphical Editor Factory 130 is responsible for creating aCommon Graphical Editor 135. When a Common Visual Model descriptor 140is read by a graphical editor application, this Common Visual Modeldescriptor is passed to the Common Graphical Editor Factory 130. Byreference to the header information of the Common Visual Modeldescriptor, the Factory locates the path of the structural file 105 ofthe Visual Model Descriptor. (See, for example, the header informationspecified at 711 and 713 in FIG. 7, which references the descriptor 810in FIG. 8.) Using this information, the Factory then creates an instance125 of the Visual Model Descriptor. The Factory also creates the CommonGraphical Editor instance 135. The Factory then passes the Visual ModelDescriptor 125, Common Visual Model 145, and the Graphical EditorDescriptor 115 (which is the configuration information of the Editor) tothe Common Graphical Editor 135.

In preferred embodiments, Common Graphical Editor 135 is a defaulteditor which is designed to accommodate the concepts of Common VisualModel 145 and Visual Model Descriptor 125. A Common Graphical Editor iscreated and instantiated by Common Graphical Editor Factory with theGraphical Editor Descriptor, as is Visual Model Descriptor which can beseen as a meta-model of the Common Visual Model. (Refer also to Block230 of FIG. 2, where this was discussed briefly.)

Note that associating the visual model with a domain object can be thefinal step in this process, as shown by “setDomainObject” at the bottomof FIG. 10.

Descriptor Registry 110 is a registry for Visual Model Descriptor 105and Graphical Editor Descriptor 115. In preferred embodiments, theregistry comprises a data structure (such as a table) which maps aspecific key to the path of the Visual Model Descriptor and the path ofGraphical Editor Descriptor. For example, an entry in this datastructure may be structured as shown by this sample triplet:

(Key_Value, Visual_Model_Descriptor_Path,Graphical_Editor_Descriptor_path)

A unique value for this key can be constructed in a number of ways,including based on a unique file name or a unique file extension,without deviating from the scope of the present invention.

Referring now to FIG. 11, a flowchart is provided showing a samplescenario of using a preferred embodiment of the invention. As showntherein, a business analyst provides a domain model on which thegraphical editor will be based (Block 1100). A usability analystoutlines the usability requirements for the elements of this domainmodel (Block 1105). Note that because of the loose coupling betweendomain model and visual model, Blocks 1100 and 1105 may be iterativeprocesses that may overlap in time.

While these analysts are refining the domain objects and requirements, adesigner determines the visual model elements corresponding to thedomain model elements (Block 1110), based on the tooling requirements,and designs the descriptors for the visual models in light of theusability requirements (Block 1115). A developer then creates the visualmodel descriptor file, defining the visual representation and editingproperties for each descriptor, based on the requirements (Block 1120).In the first milestone, the developer may use existing pre-built partsto build the descriptor. The developer also creates a Graphical EditorDescriptor (Block 1125) or may alternatively use a pre-built, defaultGraphical Editor Descriptor that may be supplied with the CommonGraphical Editor System.

At Block 1130, the developer registers the descriptors to the DescriptorRegistry. Next, the developer launches and runs the graphical editor fortesting, thus completing the first milestone (Block 1135). The developerthen releases the graphical editor to the usability analyst, looking forfeedback (Block 1140). The usability analyst launches and reviews thegraphical editor (Block 1145), and adds new requirements if necessary.Now the usability analyst is able to create the content of the visualmodel object (Block 1150). Using this visual model, the usabilityanalyst is able to touch and feel the editor and modify requirements ifnecessary (Block 1155).

Block 1160 tests to see if the pre-built parts meet the requirements(including whether a required behavior is not supported by the pre-builtparts). If not, then at Block 1165, the developer uses a graphicalapplication framework (for example, GEF) to build the necessary partsand incorporates those parts into the visual model descriptor. (GEF maybe used as a foundation framework for implementing embodiments of thepresent invention, if desired.) For example, if the pre-built parts donot contain any figures deemed suitable for representing sofas in ahouse, a new part may be created and identified in node descriptor 870of FIG. 8.

Block 1170 tests to see if the domain model is ready to incorporate intothe visual model. If so, then at Block 1175, the developer incorporatesthe mapping of the domain model into the visual model descriptor. (Inpreferred embodiments, this mapping comprises the descriptor thatspecifies the class names of the edit parts, figures, and domain model;the file name of the icons; and so forth. See, for example, 810, 820,etc. in FIG. 8.) The usability analyst may then perform additionaltesting with the editor to further refine requirements. As indicated atBlock 1180, the usability analyst and the editor developer interact witheach other until the requirements are fulfilled and the editor istherefore considered complete. The process of FIG. 11 then ends (Block1185).

As will be appreciated by one of skill in the art, embodiments of thepresent invention may be provided as (for example) methods, systems,and/or computer program products. The present invention may take theform of a computer program product which is embodied on one or morecomputer-usable storage media (including, but not limited to, diskstorage, CD-ROM, optical storage, and so forth) having computer-usableprogram code embodied therein.

The present invention has been described with reference to flow diagramsand/or block diagrams according to embodiments of the invention. It willbe understood that each flow and/or block of the flow diagrams and/orblock diagrams, and combinations of flows and/or blocks in the flowdiagrams and/or block diagrams, can be implemented by computer programinstructions. These computer program instructions may be provided to aprocessor of a general purpose computer, special purpose computer,embedded processor, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions specified in theflow diagram flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in acomputer-readable memory that can direct a computer or otherprogrammable data processing apparatus to function in a particularmanner, such that the instructions stored in the computer-readablememory produce an article of manufacture including instruction meanswhich implement the function specified in the flow diagram flow or flowsand/or block diagram block or blocks.

The computer program instructions may also be loaded onto a computer orother programmable data processing apparatus to cause a series ofoperational steps to be performed on the computer or other programmableapparatus to produce a computer implemented process such that theinstructions which execute on the computer or other programmableapparatus provide steps for implementing the functions specified in theflow diagram flow or flows and/or block diagram block or blocks.

While preferred embodiments of the present invention have beendescribed, additional variations and modifications in those embodimentsmay occur to those skilled in the art once they learn of the basicinventive concepts. Therefore, it is intended that the appended claimsshall be construed to include preferred embodiments and all suchvariations and modifications as fall within the spirit and scope of theinvention.

The invention claimed is:
 1. A system for enabling incrementaldevelopment of a graphical editor for editing objects of a domain modelusing a visual model, comprising: a computer comprising a processor;instructions configured to execute, using the processor, for: executingan editor engine component to initially create the graphical editor forediting the objects of the domain model using the visual model, furthercomprising: processing a visual model structural file, by the editorengine component, to obtain a definition specified therein of the visualmodel, an identification of a visual model descriptor file referenced inthe definition, and an identification of a domain model structural filereferenced in the definition, the domain model structural file definingthe objects of the domain model; and processing the identified visualmodel descriptor file, by the editor engine component, to obtain adefinition specified therein of constraints on the visual model, therebyconfiguring behavior to be exhibited by the created graphical editor forediting the objects defined in the domain model structural file; andsubsequently changing at least one of the identification of the visualmodel descriptor file referenced in the definition and theidentification of the domain model structural file referenced in thedefinition, wherein the subsequent change thereby causes the createdgraphical editor to exhibit different behaviors for editing the objectsdefined in the domain model structural file or to edit objects definedin a different domain model structural file, respectively.
 2. The systemaccording to claim 1, wherein the reference, in the definition, to theidentification of the domain model structural file associates aparticular domain model with the visual model, such that a domaindescribed by the particular domain model can then be graphically editedusing the graphical editor.
 3. The system according to claim 1, whereinthe instructions configured for processing the identified visual modeldescriptor file operate to configure, according to the constraints,properties of visual elements renderable with the graphical editor. 4.The system according to claim 1, wherein the identified visual modelstructural file specifies details of visual relationships to besupported by the visual model.
 5. The system according to claim 1,wherein the identified visual model descriptor file further specifies,for each of a plurality of domain model elements of domain model, areference to stored program logic that provides editing behavior forediting the domain model element and a reference to a stored graphicalelement for representing the domain model element in the graphicaleditor.
 6. A computer program product for enabling incrementaldevelopment of a graphical editor for editing objects of a domain modelusing a visual model, wherein the computer program product is embodiedon one or more non-transitory computer-readable media and comprisescomputer-readable instructions for: executing an editor engine componentthat initially creates the graphical editor for editing the objects ofthe domain model using the visual model, further comprising: processing,by the editor engine component, a visual model structural file to obtaina definition specified therein of the visual model an identification ofa visual model descriptor file referenced in the definition, and anidentification of a domain model structural file referenced in thedefinition, the domain model structural file defining the objects of thedomain model; and processing, by the editor engine component, theidentified visual model descriptor file to obtain a definition specifiedtherein of constraints on the visual model, thereby configuring behaviorto be exhibited by the created graphical editor for editing the objectsdefined in the domain model structural file; and subsequently changingat least one of the identification of the visual model descriptor filereferenced in the definition and the identification of the domain modelstructural file referenced in the definition, wherein the subsequentchange thereby causes the created graphical editor to exhibit differentbehaviors for editing the objects defined in the domain model structuralfile or to edit objects defined in a different domain model structuralfile, respectively.
 7. The computer program product according to claim6, wherein the visual model descriptor file further specifies adefinition of at least one property of at least one visual element thatis renderable with the graphical editor, and wherein responsive tomodifying the definition of a particular one of the at least oneproperty of a selected one of the at least one visual element in thevisual model descriptor file, the processing of the visual modeldescriptor file by the editor engine component causes the rendering ofthe selected visual element to change according to the particularmodified property.
 8. The computer program product according to claim 6,wherein the constraints specified in the visual model descriptor fileprovide bounds for allowable operations in the visual model when usingthe graphical editor for editing the objects of the domain model.
 9. Thecomputer program product according to claim 6, wherein the specifiedconstraints comprise permitted behaviors of elements of the visualmodel.
 10. The computer program product according to claim 6, whereinthe identified visual model descriptor file further specifies, for eachof a plurality of domain model elements of the domain model, a referenceto a stored graphical figure to be used for representing the domainmodel element in the graphical editor.
 11. The computer program productaccording to claim 6, wherein the identified visual model descriptorfile further specifies, for each of a plurality of domain model elementsof the domain model, a reference to stored program logic that providesediting behavior for editing the domain model element in the graphicaleditor, and wherein the editor engine component is adapted for changingthe editing behavior for editing the domain model elements by processinga different visual model descriptor file.